package net.ojbk.study.curriculumDesign.web.handlers.cilentservicer;

import net.ojbk.study.curriculumDesign.beans.cilentservicer.ChatMessage;
import org.springframework.http.ResponseEntity;

import javax.servlet.http.HttpSession;

/**
 * Created with IntelliJ IDEA.
 * User: twobox
 * Date: 2019/1/7
 * Time: 16:08
 * Description: No Description
 */
public interface ICustomerController {
    /**
     * 心跳包，查看是否有新消息
     * @param session
     * @return
     */
    public ResponseEntity<Object> isHaveNewMsg(HttpSession session);

    /**
     * 从数据库获取所有的服务记录
     * @param httpSession
     * @return
     */
    public ResponseEntity<Object> getALlChated(HttpSession httpSession);

    /**
     * 请求一个客服
     * @param httpSession
     * @return
     */
    public ResponseEntity<Object> requestServicer(HttpSession httpSession);

    /**
     * 获取所有消息的聊天记录
     * @param httpSession
     * @return
     */
    public ResponseEntity<Object> getAllChatMsg(HttpSession httpSession);

    /**
     * 获取新消息列表
     * @param httpSession
     * @return
     */
    public ResponseEntity<Object> getNewMsg(HttpSession httpSession);

    /**
     * 发送一条消息
     * @param httpSession
     * @param chatMessage
     * @return
     */
    public ResponseEntity<Object> sendMsg(HttpSession httpSession, ChatMessage chatMessage);

    /**
     * 断开连接
     * @param httpSession
     * @return
     */
    public ResponseEntity<Object> catChat(HttpSession httpSession);

    /**
     * 发送评分，结束会话
     * @param httpSession
     * @param score
     * @return
     */
    public ResponseEntity<Object> endChat(HttpSession httpSession, double score);

}
